package com.wc5818.wcSysUser.mapper;

import com.wc5818.wcSysUser.dto.StatisGroupByYewLevel;
import com.wc5818.wcSysUser.entity.WcSysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2020-02-15
 */
public interface WcSysUserMapper extends BaseMapper<WcSysUser> {
    @Select("select forsysuser_id as yewLevel, count(*) as amount from wc_sys_user where parentUserId = #{userId} group by forsysuser_id")
    List<StatisGroupByYewLevel> groupByYewLevel(@Param("userId") String arg0);
}
